// 全局组件自动注册
const componentField = import.meta.globEager(["./**/index.vue", "./**/index.jsx"])
export default {
  install(Vue) {
    for (const [key, comp] of Object.entries(componentField)) {
      const name = "V" + key.replace("./", "").replace("/index.vue", "").replace("/index.jsx", "")
      const component = comp.default
      Vue.component(name, component)
    }
  },
}
